# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.CloudDeploy.V1.Model.TargetRender do
  @moduledoc """
  Details of rendering for a single target.

  ## Attributes

  *   `failureCause` (*type:* `String.t`, *default:* `nil`) - Output only. Reason this render failed. This will always be unspecified while the render in progress.
  *   `failureMessage` (*type:* `String.t`, *default:* `nil`) - Output only. Additional information about the render failure, if available.
  *   `metadata` (*type:* `GoogleApi.CloudDeploy.V1.Model.RenderMetadata.t`, *default:* `nil`) - Output only. Metadata related to the `Release` render for this Target.
  *   `renderingBuild` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the Cloud Build `Build` object that is used to render the manifest for this target. Format is `projects/{project}/locations/{location}/builds/{build}`.
  *   `renderingState` (*type:* `String.t`, *default:* `nil`) - Output only. Current state of the render operation for this Target.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :failureCause => String.t() | nil,
          :failureMessage => String.t() | nil,
          :metadata => GoogleApi.CloudDeploy.V1.Model.RenderMetadata.t() | nil,
          :renderingBuild => String.t() | nil,
          :renderingState => String.t() | nil
        }

  field(:failureCause)
  field(:failureMessage)
  field(:metadata, as: GoogleApi.CloudDeploy.V1.Model.RenderMetadata)
  field(:renderingBuild)
  field(:renderingState)
end

defimpl Poison.Decoder, for: GoogleApi.CloudDeploy.V1.Model.TargetRender do
  def decode(value, options) do
    GoogleApi.CloudDeploy.V1.Model.TargetRender.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.CloudDeploy.V1.Model.TargetRender do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
